home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / dev / c / mkid.lha / src / string.h < prev    next >
C/C++ Source or Header  |  1991-02-01  |  664b  |  38 lines

  1. /* Copyright (c) 1986, Greg McGary */
  2. /* @(#)string.h    1.1 86/10/09 */
  3.  
  4. #ifdef RINDEX
  5. #define    strchr    index
  6. #define    strrchr    rindex
  7. #endif
  8.  
  9. #ifdef AMIGA
  10. #include <dos.h>
  11. #endif
  12.  
  13. #ifdef LATTICE
  14. #include <string.h>    /* get the lattice one as well */
  15. #else
  16. extern char
  17.     *strcpy(),
  18.     *strncpy(),
  19.     *strcat(),
  20.     *strncat(),
  21.     *strchr(),
  22.     *strrchr(),
  23.     *strpbrk(),
  24.     *strtok();
  25.  
  26. extern long
  27.     strtol();
  28. #endif LATTICE
  29.  
  30. extern char    *calloc();
  31.  
  32. #undef strcmp
  33.  
  34. #define strequ(s1,s2)        (strcmp((s1),(s2)) == 0)
  35. #define    strnequ(s1,s2, n)    (strncmp((s1), (s2), (n)) == 0)
  36. #define    strsav(s)        (strcpy(calloc(1, strlen(s)+1), (s)))
  37. #define    strnsav(s,n)        (strncpy(calloc(1, (n)+1), (s), (n)))
  38.